/*    1:     */ package gov.sat.tax.fwsk.wlrz;
/*    2:     */ 
/*    3:     */ import gov.chinatax.skskj.tools.CreateXmlBean;
/*    4:     */ import gov.sat.tax.fwsk.common.ConnectionPoolBean;
/*    5:     */ import java.io.File;
/*    6:     */ import java.io.FileInputStream;
/*    7:     */ import java.io.IOException;
/*    8:     */ import java.io.PrintStream;
/*    9:     */ import java.io.PrintWriter;
/*   10:     */ import java.sql.Connection;
/*   11:     */ import java.sql.PreparedStatement;
/*   12:     */ import java.sql.ResultSet;
/*   13:     */ import java.sql.SQLException;
/*   14:     */ import java.text.NumberFormat;
/*   15:     */ import java.text.SimpleDateFormat;
/*   16:     */ import java.util.Calendar;
/*   17:     */ import javax.servlet.ServletException;
/*   18:     */ import javax.servlet.ServletOutputStream;
/*   19:     */ import javax.servlet.http.HttpServletRequest;
/*   20:     */ import javax.servlet.http.HttpServletResponse;
/*   21:     */ 
/*   22:     */ public class WlrzYcrzcxCmdBean
/*   23:     */ {
/*   24:     */   public static void doDownload(HttpServletRequest req, HttpServletResponse res, String filename, String from)
/*   25:     */     throws ServletException, IOException
/*   26:     */   {
/*   27:  43 */     FileInputStream fi = null;
/*   28:     */     
/*   29:     */ 
/*   30:     */ 
/*   31:  47 */     int dfrom = Integer.parseInt(from);
/*   32:  48 */     byte[] data = new byte[8192];
/*   33:  50 */     if ((!filename.equals("version.txt")) || (!filename.equals("dlversion.txt"))) {
/*   34:  51 */       System.out.println("[INFO] " + req.getParameter("nsrsbh: ") + "download " + filename + ", " + dfrom);
/*   35:     */     }
/*   36:  53 */     String rzPath = "";
/*   37:  54 */     filename = filename.trim();
/*   38:  55 */     int FileLen = filename.length();
/*   39:  57 */     if (filename.substring(FileLen - 4, FileLen).equals(".pdf")) {
/*   40:  59 */       rzPath = rzPath + "print/" + filename;
/*   41:     */     } else {
/*   42:  63 */       rzPath = rzPath + "wlrz/" + filename;
/*   43:     */     }
/*   44:  66 */     File file = new File(rzPath);
/*   45:  67 */     int len = (int)file.length();
/*   46:     */     
/*   47:  69 */     fi = new FileInputStream(file);
/*   48:     */     
/*   49:     */ 
/*   50:  72 */     res.setContentType("application/octet-stream");
/*   51:  73 */     res.setContentLength(len - dfrom);
/*   52:     */     
/*   53:  75 */     ServletOutputStream out = res.getOutputStream();
/*   54:     */     int count;
/*   55:  77 */     if ((count = fi.read(data, dfrom, 8192)) > -1)
/*   56:     */     {
/*   57:  79 */       out.write(data, 0, count);
/*   58:  82 */       while ((count = fi.read(data)) > -1) {
/*   59:  84 */         out.write(data, 0, count);
/*   60:     */       }
/*   61:     */     }
/*   62:  89 */     fi.close();
/*   63:     */   }
/*   64:     */   
/*   65:     */   /* Error */
/*   66:     */   public static void doQyKh(TranslateParaCmdBean req, HttpServletResponse res)
/*   67:     */     throws ServletException, IOException
/*   68:     */   {
/*   69:     */     // Byte code:
/*   70:     */     //   0: invokestatic 165	gov/sat/tax/fwsk/common/ConnectionPoolBean:getHandle	()Lgov/sat/tax/fwsk/common/ConnectionPoolBean;
/*   71:     */     //   3: astore_2
/*   72:     */     //   4: aconst_null
/*   73:     */     //   5: astore_3
/*   74:     */     //   6: iconst_0
/*   75:     */     //   7: istore 4
/*   76:     */     //   9: aload_1
/*   77:     */     //   10: ldc 171
/*   78:     */     //   12: invokeinterface 114 2 0
/*   79:     */     //   17: aload_1
/*   80:     */     //   18: invokeinterface 173 1 0
/*   81:     */     //   23: astore 5
/*   82:     */     //   25: aconst_null
/*   83:     */     //   26: astore 12
/*   84:     */     //   28: new 177	java/sql/Date
/*   85:     */     //   31: dup
/*   86:     */     //   32: invokestatic 179	java/lang/System:currentTimeMillis	()J
/*   87:     */     //   35: invokespecial 182	java/sql/Date:<init>	(J)V
/*   88:     */     //   38: astore 13
/*   89:     */     //   40: new 185	java/text/SimpleDateFormat
/*   90:     */     //   43: dup
/*   91:     */     //   44: ldc 187
/*   92:     */     //   46: invokespecial 189	java/text/SimpleDateFormat:<init>	(Ljava/lang/String;)V
/*   93:     */     //   49: astore 14
/*   94:     */     //   51: aload 14
/*   95:     */     //   53: aload 13
/*   96:     */     //   55: invokevirtual 190	java/text/SimpleDateFormat:format	(Ljava/util/Date;)Ljava/lang/String;
/*   97:     */     //   58: astore 15
/*   98:     */     //   60: aload_0
/*   99:     */     //   61: ldc 194
/*  100:     */     //   63: invokevirtual 196	gov/sat/tax/fwsk/wlrz/TranslateParaCmdBean:getParameter	(Ljava/lang/String;)Ljava/lang/String;
/*  101:     */     //   66: ifnonnull +8 -> 74
/*  102:     */     //   69: ldc 78
/*  103:     */     //   71: goto +9 -> 80
/*  104:     */     //   74: aload_0
/*  105:     */     //   75: ldc 194
/*  106:     */     //   77: invokevirtual 196	gov/sat/tax/fwsk/wlrz/TranslateParaCmdBean:getParameter	(Ljava/lang/String;)Ljava/lang/String;
/*  107:     */     //   80: astore 6
/*  108:     */     //   82: aload_0
/*  109:     */     //   83: ldc 199
/*  110:     */     //   85: invokevirtual 196	gov/sat/tax/fwsk/wlrz/TranslateParaCmdBean:getParameter	(Ljava/lang/String;)Ljava/lang/String;
/*  111:     */     //   88: ifnonnull +8 -> 96
/*  112:     */     //   91: ldc 78
/*  113:     */     //   93: goto +9 -> 102
/*  114:     */     //   96: aload_0
/*  115:     */     //   97: ldc 199
/*  116:     */     //   99: invokevirtual 196	gov/sat/tax/fwsk/wlrz/TranslateParaCmdBean:getParameter	(Ljava/lang/String;)Ljava/lang/String;
/*  117:     */     //   102: astore 8
/*  118:     */     //   104: aload_0
/*  119:     */     //   105: ldc 201
/*  120:     */     //   107: invokevirtual 196	gov/sat/tax/fwsk/wlrz/TranslateParaCmdBean:getParameter	(Ljava/lang/String;)Ljava/lang/String;
/*  121:     */     //   110: ifnonnull +8 -> 118
/*  122:     */     //   113: ldc 78
/*  123:     */     //   115: goto +9 -> 124
/*  124:     */     //   118: aload_0
/*  125:     */     //   119: ldc 201
/*  126:     */     //   121: invokevirtual 196	gov/sat/tax/fwsk/wlrz/TranslateParaCmdBean:getParameter	(Ljava/lang/String;)Ljava/lang/String;
/*  127:     */     //   124: astore 9
/*  128:     */     //   126: aload_0
/*  129:     */     //   127: ldc 203
/*  130:     */     //   129: invokevirtual 196	gov/sat/tax/fwsk/wlrz/TranslateParaCmdBean:getParameter	(Ljava/lang/String;)Ljava/lang/String;
/*  131:     */     //   132: ifnonnull +8 -> 140
/*  132:     */     //   135: ldc 78
/*  133:     */     //   137: goto +9 -> 146
/*  134:     */     //   140: aload_0
/*  135:     */     //   141: ldc 203
/*  136:     */     //   143: invokevirtual 196	gov/sat/tax/fwsk/wlrz/TranslateParaCmdBean:getParameter	(Ljava/lang/String;)Ljava/lang/String;
/*  137:     */     //   146: astore 11
/*  138:     */     //   148: aload_0
/*  139:     */     //   149: ldc 205
/*  140:     */     //   151: invokevirtual 196	gov/sat/tax/fwsk/wlrz/TranslateParaCmdBean:getParameter	(Ljava/lang/String;)Ljava/lang/String;
/*  141:     */     //   154: ifnonnull +8 -> 162
/*  142:     */     //   157: ldc 78
/*  143:     */     //   159: goto +9 -> 168
/*  144:     */     //   162: aload_0
/*  145:     */     //   163: ldc 205
/*  146:     */     //   165: invokevirtual 196	gov/sat/tax/fwsk/wlrz/TranslateParaCmdBean:getParameter	(Ljava/lang/String;)Ljava/lang/String;
/*  147:     */     //   168: astore 12
/*  148:     */     //   170: aconst_null
/*  149:     */     //   171: astore 10
/*  150:     */     //   173: ldc 207
/*  151:     */     //   175: astore 7
/*  152:     */     //   177: aload_2
/*  153:     */     //   178: invokevirtual 209	gov/sat/tax/fwsk/common/ConnectionPoolBean:getConnection	()Ljava/sql/Connection;
/*  154:     */     //   181: astore_3
/*  155:     */     //   182: aload_3
/*  156:     */     //   183: ifnull +667 -> 850
/*  157:     */     //   186: aconst_null
/*  158:     */     //   187: astore 16
/*  159:     */     //   189: new 43	java/lang/StringBuffer
/*  160:     */     //   192: dup
/*  161:     */     //   193: ldc 213
/*  162:     */     //   195: invokespecial 47	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
/*  163:     */     //   198: aload 6
/*  164:     */     //   200: invokevirtual 58	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
/*  165:     */     //   203: ldc 215
/*  166:     */     //   205: invokevirtual 58	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
/*  167:     */     //   208: invokevirtual 69	java/lang/StringBuffer:toString	()Ljava/lang/String;
/*  168:     */     //   211: astore 17
/*  169:     */     //   213: aload_3
/*  170:     */     //   214: aload 17
/*  171:     */     //   216: sipush 1003
/*  172:     */     //   219: sipush 1007
/*  173:     */     //   222: invokeinterface 217 4 0
/*  174:     */     //   227: astore 16
/*  175:     */     //   229: aload 16
/*  176:     */     //   231: invokeinterface 223 1 0
/*  177:     */     //   236: astore 18
/*  178:     */     //   238: goto +28 -> 266
/*  179:     */     //   241: aload 18
/*  180:     */     //   243: ldc 229
/*  181:     */     //   245: invokeinterface 231 2 0
/*  182:     */     //   250: astore 10
/*  183:     */     //   252: aload 18
/*  184:     */     //   254: ldc 236
/*  185:     */     //   256: invokeinterface 231 2 0
/*  186:     */     //   261: astore 7
/*  187:     */     //   263: iinc 4 1
/*  188:     */     //   266: aload 18
/*  189:     */     //   268: invokeinterface 238 1 0
/*  190:     */     //   273: ifne -32 -> 241
/*  191:     */     //   276: iload 4
/*  192:     */     //   278: ifne +62 -> 340
/*  193:     */     //   281: aload 5
/*  194:     */     //   283: ldc 242
/*  195:     */     //   285: invokevirtual 244	java/io/PrintWriter:println	(Ljava/lang/String;)V
/*  196:     */     //   288: aload 5
/*  197:     */     //   290: ldc 247
/*  198:     */     //   292: invokevirtual 244	java/io/PrintWriter:println	(Ljava/lang/String;)V
/*  199:     */     //   295: getstatic 37	java/lang/System:out	Ljava/io/PrintStream;
/*  200:     */     //   298: ldc 249
/*  201:     */     //   300: invokevirtual 73	java/io/PrintStream:println	(Ljava/lang/String;)V
/*  202:     */     //   303: aload 16
/*  203:     */     //   305: ifnull +10 -> 315
/*  204:     */     //   308: aload 16
/*  205:     */     //   310: invokeinterface 251 1 0
/*  206:     */     //   315: aload_3
/*  207:     */     //   316: ifnull +11 -> 327
/*  208:     */     //   319: aload_2
/*  209:     */     //   320: aload_3
/*  210:     */     //   321: invokevirtual 252	gov/sat/tax/fwsk/common/ConnectionPoolBean:closeConnection	(Ljava/sql/Connection;)Z
/*  211:     */     //   324: pop
/*  212:     */     //   325: aconst_null
/*  213:     */     //   326: astore_3
/*  214:     */     //   327: aload_3
/*  215:     */     //   328: ifnull +11 -> 339
/*  216:     */     //   331: aload_2
/*  217:     */     //   332: aload_3
/*  218:     */     //   333: invokevirtual 252	gov/sat/tax/fwsk/common/ConnectionPoolBean:closeConnection	(Ljava/sql/Connection;)Z
/*  219:     */     //   336: pop
/*  220:     */     //   337: aconst_null
/*  221:     */     //   338: astore_3
/*  222:     */     //   339: return
/*  223:     */     //   340: ldc_w 256
/*  224:     */     //   343: astore 17
/*  225:     */     //   345: aload_3
/*  226:     */     //   346: aload 17
/*  227:     */     //   348: invokeinterface 258 2 0
/*  228:     */     //   353: astore 16
/*  229:     */     //   355: aload 16
/*  230:     */     //   357: iconst_1
/*  231:     */     //   358: aload 6
/*  232:     */     //   360: invokeinterface 261 3 0
/*  233:     */     //   365: aload 16
/*  234:     */     //   367: iconst_2
/*  235:     */     //   368: aload 7
/*  236:     */     //   370: invokestatic 265	gov/sat/tax/fwsk/common/TransFormatServlet:GBToUnicode	(Ljava/lang/String;)Ljava/lang/String;
/*  237:     */     //   373: invokeinterface 261 3 0
/*  238:     */     //   378: aload 16
/*  239:     */     //   380: iconst_3
/*  240:     */     //   381: aload 10
/*  241:     */     //   383: invokeinterface 261 3 0
/*  242:     */     //   388: aload 16
/*  243:     */     //   390: iconst_4
/*  244:     */     //   391: aload 8
/*  245:     */     //   393: invokestatic 265	gov/sat/tax/fwsk/common/TransFormatServlet:GBToUnicode	(Ljava/lang/String;)Ljava/lang/String;
/*  246:     */     //   396: invokeinterface 261 3 0
/*  247:     */     //   401: aload 16
/*  248:     */     //   403: iconst_5
/*  249:     */     //   404: aload 9
/*  250:     */     //   406: invokeinterface 261 3 0
/*  251:     */     //   411: aload 16
/*  252:     */     //   413: bipush 6
/*  253:     */     //   415: aload 11
/*  254:     */     //   417: invokestatic 21	java/lang/Integer:parseInt	(Ljava/lang/String;)I
/*  255:     */     //   420: invokeinterface 270 3 0
/*  256:     */     //   425: aload 16
/*  257:     */     //   427: bipush 7
/*  258:     */     //   429: aload 12
/*  259:     */     //   431: invokeinterface 261 3 0
/*  260:     */     //   436: aload 16
/*  261:     */     //   438: bipush 8
/*  262:     */     //   440: aload 15
/*  263:     */     //   442: invokeinterface 261 3 0
/*  264:     */     //   447: aload 16
/*  265:     */     //   449: bipush 9
/*  266:     */     //   451: ldc_w 274
/*  267:     */     //   454: invokeinterface 261 3 0
/*  268:     */     //   459: aload 16
/*  269:     */     //   461: bipush 10
/*  270:     */     //   463: ldc_w 276
/*  271:     */     //   466: invokeinterface 261 3 0
/*  272:     */     //   471: aload 16
/*  273:     */     //   473: bipush 11
/*  274:     */     //   475: ldc_w 278
/*  275:     */     //   478: invokeinterface 261 3 0
/*  276:     */     //   483: aload 16
/*  277:     */     //   485: bipush 12
/*  278:     */     //   487: ldc_w 280
/*  279:     */     //   490: invokeinterface 261 3 0
/*  280:     */     //   495: aload 16
/*  281:     */     //   497: invokeinterface 282 1 0
/*  282:     */     //   502: pop
/*  283:     */     //   503: aload_3
/*  284:     */     //   504: invokeinterface 285 1 0
/*  285:     */     //   509: aload 5
/*  286:     */     //   511: ldc_w 288
/*  287:     */     //   514: invokevirtual 244	java/io/PrintWriter:println	(Ljava/lang/String;)V
/*  288:     */     //   517: aload 5
/*  289:     */     //   519: ldc_w 290
/*  290:     */     //   522: invokevirtual 244	java/io/PrintWriter:println	(Ljava/lang/String;)V
/*  291:     */     //   525: getstatic 37	java/lang/System:out	Ljava/io/PrintStream;
/*  292:     */     //   528: new 43	java/lang/StringBuffer
/*  293:     */     //   531: dup
/*  294:     */     //   532: ldc_w 292
/*  295:     */     //   535: invokespecial 47	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
/*  296:     */     //   538: aload 6
/*  297:     */     //   540: invokevirtual 58	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
/*  298:     */     //   543: ldc_w 294
/*  299:     */     //   546: invokevirtual 58	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
/*  300:     */     //   549: invokevirtual 69	java/lang/StringBuffer:toString	()Ljava/lang/String;
/*  301:     */     //   552: invokevirtual 73	java/io/PrintStream:println	(Ljava/lang/String;)V
/*  302:     */     //   555: goto -252 -> 303
/*  303:     */     //   558: astore 17
/*  304:     */     //   560: aload 17
/*  305:     */     //   562: invokevirtual 296	java/sql/SQLException:getErrorCode	()I
/*  306:     */     //   565: iconst_1
/*  307:     */     //   566: if_icmpne +80 -> 646
/*  308:     */     //   569: aload 5
/*  309:     */     //   571: ldc_w 301
/*  310:     */     //   574: invokevirtual 244	java/io/PrintWriter:println	(Ljava/lang/String;)V
/*  311:     */     //   577: aload 5
/*  312:     */     //   579: ldc_w 303
/*  313:     */     //   582: invokevirtual 244	java/io/PrintWriter:println	(Ljava/lang/String;)V
/*  314:     */     //   585: getstatic 37	java/lang/System:out	Ljava/io/PrintStream;
/*  315:     */     //   588: new 43	java/lang/StringBuffer
/*  316:     */     //   591: dup
/*  317:     */     //   592: ldc_w 305
/*  318:     */     //   595: invokespecial 47	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
/*  319:     */     //   598: aload 6
/*  320:     */     //   600: invokevirtual 58	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
/*  321:     */     //   603: invokevirtual 69	java/lang/StringBuffer:toString	()Ljava/lang/String;
/*  322:     */     //   606: invokevirtual 73	java/io/PrintStream:println	(Ljava/lang/String;)V
/*  323:     */     //   609: aload 16
/*  324:     */     //   611: ifnull +10 -> 621
/*  325:     */     //   614: aload 16
/*  326:     */     //   616: invokeinterface 251 1 0
/*  327:     */     //   621: aload_3
/*  328:     */     //   622: ifnull +11 -> 633
/*  329:     */     //   625: aload_2
/*  330:     */     //   626: aload_3
/*  331:     */     //   627: invokevirtual 252	gov/sat/tax/fwsk/common/ConnectionPoolBean:closeConnection	(Ljava/sql/Connection;)Z
/*  332:     */     //   630: pop
/*  333:     */     //   631: aconst_null
/*  334:     */     //   632: astore_3
/*  335:     */     //   633: aload_3
/*  336:     */     //   634: ifnull +11 -> 645
/*  337:     */     //   637: aload_2
/*  338:     */     //   638: aload_3
/*  339:     */     //   639: invokevirtual 252	gov/sat/tax/fwsk/common/ConnectionPoolBean:closeConnection	(Ljava/sql/Connection;)Z
/*  340:     */     //   642: pop
/*  341:     */     //   643: aconst_null
/*  342:     */     //   644: astore_3
/*  343:     */     //   645: return
/*  344:     */     //   646: aload 5
/*  345:     */     //   648: ldc_w 307
/*  346:     */     //   651: invokevirtual 244	java/io/PrintWriter:println	(Ljava/lang/String;)V
/*  347:     */     //   654: aload 5
/*  348:     */     //   656: new 43	java/lang/StringBuffer
/*  349:     */     //   659: dup
/*  350:     */     //   660: ldc_w 309
/*  351:     */     //   663: invokespecial 47	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
/*  352:     */     //   666: aload 17
/*  353:     */     //   668: invokevirtual 311	java/sql/SQLException:toString	()Ljava/lang/String;
/*  354:     */     //   671: bipush 10
/*  355:     */     //   673: bipush 32
/*  356:     */     //   675: invokevirtual 312	java/lang/String:replace	(CC)Ljava/lang/String;
/*  357:     */     //   678: invokevirtual 58	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
/*  358:     */     //   681: invokevirtual 69	java/lang/StringBuffer:toString	()Ljava/lang/String;
/*  359:     */     //   684: invokevirtual 244	java/io/PrintWriter:println	(Ljava/lang/String;)V
/*  360:     */     //   687: getstatic 37	java/lang/System:out	Ljava/io/PrintStream;
/*  361:     */     //   690: new 43	java/lang/StringBuffer
/*  362:     */     //   693: dup
/*  363:     */     //   694: ldc_w 316
/*  364:     */     //   697: invokespecial 47	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
/*  365:     */     //   700: aload 17
/*  366:     */     //   702: invokevirtual 311	java/sql/SQLException:toString	()Ljava/lang/String;
/*  367:     */     //   705: invokevirtual 58	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
/*  368:     */     //   708: invokevirtual 69	java/lang/StringBuffer:toString	()Ljava/lang/String;
/*  369:     */     //   711: invokevirtual 73	java/io/PrintStream:println	(Ljava/lang/String;)V
/*  370:     */     //   714: aload 16
/*  371:     */     //   716: ifnull +10 -> 726
/*  372:     */     //   719: aload 16
/*  373:     */     //   721: invokeinterface 251 1 0
/*  374:     */     //   726: aload_3
/*  375:     */     //   727: ifnull +123 -> 850
/*  376:     */     //   730: aload_2
/*  377:     */     //   731: aload_3
/*  378:     */     //   732: invokevirtual 252	gov/sat/tax/fwsk/common/ConnectionPoolBean:closeConnection	(Ljava/sql/Connection;)Z
/*  379:     */     //   735: pop
/*  380:     */     //   736: aconst_null
/*  381:     */     //   737: astore_3
/*  382:     */     //   738: goto +112 -> 850
/*  383:     */     //   741: astore 19
/*  384:     */     //   743: aload 16
/*  385:     */     //   745: ifnull +10 -> 755
/*  386:     */     //   748: aload 16
/*  387:     */     //   750: invokeinterface 251 1 0
/*  388:     */     //   755: aload_3
/*  389:     */     //   756: ifnull +11 -> 767
/*  390:     */     //   759: aload_2
/*  391:     */     //   760: aload_3
/*  392:     */     //   761: invokevirtual 252	gov/sat/tax/fwsk/common/ConnectionPoolBean:closeConnection	(Ljava/sql/Connection;)Z
/*  393:     */     //   764: pop
/*  394:     */     //   765: aconst_null
/*  395:     */     //   766: astore_3
/*  396:     */     //   767: aload 19
/*  397:     */     //   769: athrow
/*  398:     */     //   770: astore 16
/*  399:     */     //   772: aload 5
/*  400:     */     //   774: ldc_w 307
/*  401:     */     //   777: invokevirtual 244	java/io/PrintWriter:println	(Ljava/lang/String;)V
/*  402:     */     //   780: aload 5
/*  403:     */     //   782: new 43	java/lang/StringBuffer
/*  404:     */     //   785: dup
/*  405:     */     //   786: ldc_w 318
/*  406:     */     //   789: invokespecial 47	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
/*  407:     */     //   792: aload 16
/*  408:     */     //   794: invokevirtual 320	java/lang/Exception:toString	()Ljava/lang/String;
/*  409:     */     //   797: bipush 10
/*  410:     */     //   799: bipush 32
/*  411:     */     //   801: invokevirtual 312	java/lang/String:replace	(CC)Ljava/lang/String;
/*  412:     */     //   804: invokevirtual 58	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
/*  413:     */     //   807: invokevirtual 69	java/lang/StringBuffer:toString	()Ljava/lang/String;
/*  414:     */     //   810: invokevirtual 244	java/io/PrintWriter:println	(Ljava/lang/String;)V
/*  415:     */     //   813: aload 5
/*  416:     */     //   815: invokevirtual 323	java/io/PrintWriter:println	()V
/*  417:     */     //   818: aload_3
/*  418:     */     //   819: ifnull +43 -> 862
/*  419:     */     //   822: aload_2
/*  420:     */     //   823: aload_3
/*  421:     */     //   824: invokevirtual 252	gov/sat/tax/fwsk/common/ConnectionPoolBean:closeConnection	(Ljava/sql/Connection;)Z
/*  422:     */     //   827: pop
/*  423:     */     //   828: aconst_null
/*  424:     */     //   829: astore_3
/*  425:     */     //   830: goto +32 -> 862
/*  426:     */     //   833: astore 20
/*  427:     */     //   835: aload_3
/*  428:     */     //   836: ifnull +11 -> 847
/*  429:     */     //   839: aload_2
/*  430:     */     //   840: aload_3
/*  431:     */     //   841: invokevirtual 252	gov/sat/tax/fwsk/common/ConnectionPoolBean:closeConnection	(Ljava/sql/Connection;)Z
/*  432:     */     //   844: pop
/*  433:     */     //   845: aconst_null
/*  434:     */     //   846: astore_3
/*  435:     */     //   847: aload 20
/*  436:     */     //   849: athrow
/*  437:     */     //   850: aload_3
/*  438:     */     //   851: ifnull +11 -> 862
/*  439:     */     //   854: aload_2
/*  440:     */     //   855: aload_3
/*  441:     */     //   856: invokevirtual 252	gov/sat/tax/fwsk/common/ConnectionPoolBean:closeConnection	(Ljava/sql/Connection;)Z
/*  442:     */     //   859: pop
/*  443:     */     //   860: aconst_null
/*  444:     */     //   861: astore_3
/*  445:     */     //   862: return
/*  446:     */     // Line number table:
/*  447:     */     //   Java source line #106	-> byte code offset #0
/*  448:     */     //   Java source line #107	-> byte code offset #4
/*  449:     */     //   Java source line #108	-> byte code offset #6
/*  450:     */     //   Java source line #110	-> byte code offset #9
/*  451:     */     //   Java source line #111	-> byte code offset #17
/*  452:     */     //   Java source line #114	-> byte code offset #25
/*  453:     */     //   Java source line #117	-> byte code offset #28
/*  454:     */     //   Java source line #118	-> byte code offset #40
/*  455:     */     //   Java source line #119	-> byte code offset #51
/*  456:     */     //   Java source line #121	-> byte code offset #60
/*  457:     */     //   Java source line #122	-> byte code offset #82
/*  458:     */     //   Java source line #123	-> byte code offset #104
/*  459:     */     //   Java source line #124	-> byte code offset #126
/*  460:     */     //   Java source line #125	-> byte code offset #148
/*  461:     */     //   Java source line #127	-> byte code offset #170
/*  462:     */     //   Java source line #130	-> byte code offset #177
/*  463:     */     //   Java source line #131	-> byte code offset #182
/*  464:     */     //   Java source line #134	-> byte code offset #186
/*  465:     */     //   Java source line #138	-> byte code offset #189
/*  466:     */     //   Java source line #140	-> byte code offset #213
/*  467:     */     //   Java source line #141	-> byte code offset #229
/*  468:     */     //   Java source line #143	-> byte code offset #238
/*  469:     */     //   Java source line #145	-> byte code offset #241
/*  470:     */     //   Java source line #146	-> byte code offset #252
/*  471:     */     //   Java source line #147	-> byte code offset #263
/*  472:     */     //   Java source line #143	-> byte code offset #266
/*  473:     */     //   Java source line #149	-> byte code offset #276
/*  474:     */     //   Java source line #151	-> byte code offset #281
/*  475:     */     //   Java source line #152	-> byte code offset #288
/*  476:     */     //   Java source line #153	-> byte code offset #295
/*  477:     */     //   Java source line #201	-> byte code offset #303
/*  478:     */     //   Java source line #203	-> byte code offset #308
/*  479:     */     //   Java source line #205	-> byte code offset #315
/*  480:     */     //   Java source line #207	-> byte code offset #319
/*  481:     */     //   Java source line #208	-> byte code offset #325
/*  482:     */     //   Java source line #221	-> byte code offset #327
/*  483:     */     //   Java source line #223	-> byte code offset #331
/*  484:     */     //   Java source line #224	-> byte code offset #337
/*  485:     */     //   Java source line #154	-> byte code offset #339
/*  486:     */     //   Java source line #158	-> byte code offset #340
/*  487:     */     //   Java source line #159	-> byte code offset #345
/*  488:     */     //   Java source line #161	-> byte code offset #355
/*  489:     */     //   Java source line #162	-> byte code offset #365
/*  490:     */     //   Java source line #163	-> byte code offset #378
/*  491:     */     //   Java source line #164	-> byte code offset #388
/*  492:     */     //   Java source line #165	-> byte code offset #401
/*  493:     */     //   Java source line #166	-> byte code offset #411
/*  494:     */     //   Java source line #167	-> byte code offset #425
/*  495:     */     //   Java source line #168	-> byte code offset #436
/*  496:     */     //   Java source line #169	-> byte code offset #447
/*  497:     */     //   Java source line #170	-> byte code offset #459
/*  498:     */     //   Java source line #171	-> byte code offset #471
/*  499:     */     //   Java source line #172	-> byte code offset #483
/*  500:     */     //   Java source line #173	-> byte code offset #495
/*  501:     */     //   Java source line #174	-> byte code offset #503
/*  502:     */     //   Java source line #176	-> byte code offset #509
/*  503:     */     //   Java source line #177	-> byte code offset #517
/*  504:     */     //   Java source line #178	-> byte code offset #525
/*  505:     */     //   Java source line #179	-> byte code offset #555
/*  506:     */     //   Java source line #182	-> byte code offset #558
/*  507:     */     //   Java source line #184	-> byte code offset #560
/*  508:     */     //   Java source line #186	-> byte code offset #569
/*  509:     */     //   Java source line #187	-> byte code offset #577
/*  510:     */     //   Java source line #189	-> byte code offset #585
/*  511:     */     //   Java source line #201	-> byte code offset #609
/*  512:     */     //   Java source line #203	-> byte code offset #614
/*  513:     */     //   Java source line #205	-> byte code offset #621
/*  514:     */     //   Java source line #207	-> byte code offset #625
/*  515:     */     //   Java source line #208	-> byte code offset #631
/*  516:     */     //   Java source line #221	-> byte code offset #633
/*  517:     */     //   Java source line #223	-> byte code offset #637
/*  518:     */     //   Java source line #224	-> byte code offset #643
/*  519:     */     //   Java source line #190	-> byte code offset #645
/*  520:     */     //   Java source line #194	-> byte code offset #646
/*  521:     */     //   Java source line #195	-> byte code offset #654
/*  522:     */     //   Java source line #196	-> byte code offset #687
/*  523:     */     //   Java source line #201	-> byte code offset #714
/*  524:     */     //   Java source line #203	-> byte code offset #719
/*  525:     */     //   Java source line #205	-> byte code offset #726
/*  526:     */     //   Java source line #207	-> byte code offset #730
/*  527:     */     //   Java source line #208	-> byte code offset #736
/*  528:     */     //   Java source line #200	-> byte code offset #741
/*  529:     */     //   Java source line #201	-> byte code offset #743
/*  530:     */     //   Java source line #203	-> byte code offset #748
/*  531:     */     //   Java source line #205	-> byte code offset #755
/*  532:     */     //   Java source line #207	-> byte code offset #759
/*  533:     */     //   Java source line #208	-> byte code offset #765
/*  534:     */     //   Java source line #210	-> byte code offset #767
/*  535:     */     //   Java source line #213	-> byte code offset #770
/*  536:     */     //   Java source line #215	-> byte code offset #772
/*  537:     */     //   Java source line #216	-> byte code offset #780
/*  538:     */     //   Java source line #217	-> byte code offset #813
/*  539:     */     //   Java source line #221	-> byte code offset #818
/*  540:     */     //   Java source line #223	-> byte code offset #822
/*  541:     */     //   Java source line #224	-> byte code offset #828
/*  542:     */     //   Java source line #220	-> byte code offset #833
/*  543:     */     //   Java source line #221	-> byte code offset #835
/*  544:     */     //   Java source line #223	-> byte code offset #839
/*  545:     */     //   Java source line #224	-> byte code offset #845
/*  546:     */     //   Java source line #226	-> byte code offset #847
/*  547:     */     //   Java source line #221	-> byte code offset #850
/*  548:     */     //   Java source line #223	-> byte code offset #854
/*  549:     */     //   Java source line #224	-> byte code offset #860
/*  550:     */     //   Java source line #227	-> byte code offset #862
/*  551:     */     // Local variable table:
/*  552:     */     //   start	length	slot	name	signature
/*  553:     */     //   0	863	0	req	TranslateParaCmdBean
/*  554:     */     //   0	863	1	res	HttpServletResponse
/*  555:     */     //   3	852	2	handler	ConnectionPoolBean
/*  556:     */     //   5	857	3	conn	Connection
/*  557:     */     //   7	270	4	RecCount	int
/*  558:     */     //   23	791	5	out	PrintWriter
/*  559:     */     //   80	519	6	nsrsbh	String
/*  560:     */     //   175	194	7	nsrmc	String
/*  561:     */     //   102	290	8	czydm	String
/*  562:     */     //   124	281	9	czypwd	String
/*  563:     */     //   171	211	10	swjg_dm	String
/*  564:     */     //   146	270	11	yx_yccs	String
/*  565:     */     //   26	404	12	jzrq	String
/*  566:     */     //   38	16	13	dt	java.sql.Date
/*  567:     */     //   49	3	14	sdf	SimpleDateFormat
/*  568:     */     //   58	383	15	cur_sjstr	String
/*  569:     */     //   187	122	16	stmt	PreparedStatement
/*  570:     */     //   340	275	16	stmt	PreparedStatement
/*  571:     */     //   646	103	16	stmt	PreparedStatement
/*  572:     */     //   770	23	16	e	Exception
/*  573:     */     //   211	4	17	Sqls	String
/*  574:     */     //   340	7	17	Sqls	String
/*  575:     */     //   558	3	17	e	SQLException
/*  576:     */     //   646	55	17	e	SQLException
/*  577:     */     //   236	31	18	reDataSet	ResultSet
/*  578:     */     //   340	1	18	reDataSet	ResultSet
/*  579:     */     //   741	27	19	localObject1	Object
/*  580:     */     //   833	15	20	localObject2	Object
/*  581:     */     // Exception table:
/*  582:     */     //   from	to	target	type
/*  583:     */     //   189	303	558	java/sql/SQLException
/*  584:     */     //   340	558	558	java/sql/SQLException
/*  585:     */     //   189	303	741	finally
/*  586:     */     //   340	609	741	finally
/*  587:     */     //   646	714	741	finally
/*  588:     */     //   177	327	770	java/lang/Exception
/*  589:     */     //   340	633	770	java/lang/Exception
/*  590:     */     //   646	770	770	java/lang/Exception
/*  591:     */     //   177	327	833	finally
/*  592:     */     //   340	633	833	finally
/*  593:     */     //   646	818	833	finally
/*  594:     */   }
/*  595:     */   
/*  596:     */   public static void doChangeJzrq(TranslateParaCmdBean req, HttpServletResponse res)
/*  597:     */     throws ServletException, IOException
/*  598:     */   {
/*  599: 242 */     ConnectionPoolBean handler = ConnectionPoolBean.getHandle();
/*  600: 243 */     Connection conn = null;
/*  601: 244 */     int RecCount = 0;
/*  602:     */     
/*  603: 246 */     res.setContentType("text/html; charset=gb2312");
/*  604: 247 */     PrintWriter out = res.getWriter();
/*  605:     */     
/*  606:     */ 
/*  607: 250 */     String jzrq = null;
/*  608:     */     
/*  609:     */ 
/*  610: 253 */     java.sql.Date dt = new java.sql.Date(System.currentTimeMillis());
/*  611: 254 */     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
/*  612: 255 */     String cur_sjstr = sdf.format(dt);
/*  613:     */     
/*  614: 257 */     String nsrsbh = req.getParameter("nsrsbh") == null ? "" : req.getParameter("nsrsbh");
/*  615: 258 */     jzrq = req.getParameter("jzrq") == null ? "" : req.getParameter("jzrq");
/*  616:     */     try
/*  617:     */     {
/*  618: 266 */       conn = handler.getConnection();
/*  619: 267 */       if (conn != null)
/*  620:     */       {
/*  621: 270 */         PreparedStatement stmt = null;
/*  622:     */         try
/*  623:     */         {
/*  624: 273 */           String Sqls = "update htjs.WSRZ_QY_KHXX set jzrq=to_date('" + jzrq + "','yyyy-mm-dd') where NSRSBH='" + nsrsbh + "'";
/*  625:     */           
/*  626: 275 */           stmt = conn.prepareStatement(Sqls, 1003, 1007);
/*  627: 276 */           RecCount = stmt.executeUpdate();
/*  628: 277 */           conn.commit();
/*  629: 279 */           if (RecCount == 0)
/*  630:     */           {
/*  631: 281 */             out.println("303");
/*  632: 282 */             out.println("当前开户信息表中无记录！");
/*  633: 283 */             System.out.println("[ERROR] 当前开户信息表中无记录 " + nsrsbh);
/*  634:     */           }
/*  635:     */           PreparedStatement stmt;
/*  636:     */           for (;;)
/*  637:     */           {
/*  638: 303 */             if (stmt != null) {
/*  639: 305 */               stmt.close();
/*  640:     */             }
/*  641: 307 */             if (conn != null)
/*  642:     */             {
/*  643: 309 */               handler.closeConnection(conn);
/*  644: 310 */               conn = null;
/*  645:     */             }
/*  646:     */             return;
/*  647:     */             String Sqls;
/*  648: 288 */             out.println("300");
/*  649: 289 */             out.println("企业截止日期修改成功");
/*  650: 290 */             System.out.println("[INFO] 企业" + nsrsbh + " 截止日期修改成功");
/*  651:     */           }
/*  652:     */           PreparedStatement stmt;
/*  653: 316 */           out.println("301");
/*  654:     */         }
/*  655:     */         catch (SQLException e)
/*  656:     */         {
/*  657: 296 */           out.println("302");
/*  658: 297 */           out.println("数据库操作异常，异常信息为：" + e.toString().replace('\n', ' '));
/*  659: 298 */           System.out.println("[ERROR] 数据库操作异常，异常信息为：" + e.toString());
/*  660: 303 */           if (stmt != null) {
/*  661: 305 */             stmt.close();
/*  662:     */           }
/*  663: 307 */           if (conn != null)
/*  664:     */           {
/*  665: 309 */             handler.closeConnection(conn);
/*  666: 310 */             conn = null;
/*  667:     */           }
/*  668: 299 */           return;
/*  669:     */         }
/*  670:     */         finally
/*  671:     */         {
/*  672: 303 */           if (stmt != null) {
/*  673: 305 */             stmt.close();
/*  674:     */           }
/*  675:     */         }
/*  676:     */       }
/*  677: 317 */       out.println("连接数据库失败");
/*  678: 318 */       System.out.println("[ERROR] 修改截止日期连接数据库失败");
/*  679: 319 */       return;
/*  680:     */     }
/*  681:     */     catch (Exception e)
/*  682:     */     {
/*  683: 324 */       out.println("302");
/*  684: 325 */       out.println("有异常发生，异常信息为：" + e.toString().replace('\n', ' '));
/*  685: 326 */       out.println();
/*  686: 327 */       return;
/*  687:     */     }
/*  688:     */     finally
/*  689:     */     {
/*  690: 331 */       if (conn != null)
/*  691:     */       {
/*  692: 333 */         handler.closeConnection(conn);
/*  693: 334 */         conn = null;
/*  694:     */       }
/*  695:     */     }
/*  696:     */   }
/*  697:     */   
/*  698:     */   private int doCompare(String bdate, String hdate)
/*  699:     */   {
/*  700: 353 */     if ((bdate == null) || (bdate.length() < 10)) {
/*  701: 354 */       return 9;
/*  702:     */     }
/*  703: 355 */     if ((hdate == null) || (hdate.length() < 10)) {
/*  704: 356 */       return 9;
/*  705:     */     }
/*  706: 357 */     String bday = null;
/*  707: 358 */     String hday = null;
/*  708:     */     
/*  709: 360 */     String byear = bdate.substring(0, 4);
/*  710: 361 */     String bmon = bdate.substring(5, 7);
/*  711: 362 */     bday = bdate.substring(8, 10);
/*  712:     */     
/*  713: 364 */     String hyear = hdate.substring(0, 4);
/*  714: 365 */     String hmon = hdate.substring(5, 7);
/*  715: 366 */     hday = hdate.substring(8, 10);
/*  716: 368 */     if (Integer.parseInt(byear) > Integer.parseInt(hyear)) {
/*  717: 370 */       return 1;
/*  718:     */     }
/*  719: 372 */     if (Integer.parseInt(byear) < Integer.parseInt(hyear)) {
/*  720: 374 */       return 2;
/*  721:     */     }
/*  722: 376 */     if (Integer.parseInt(bmon) > Integer.parseInt(hmon)) {
/*  723: 378 */       return 1;
/*  724:     */     }
/*  725: 380 */     if (Integer.parseInt(bmon) < Integer.parseInt(hmon)) {
/*  726: 382 */       return 2;
/*  727:     */     }
/*  728: 384 */     if (Integer.parseInt(bday) > Integer.parseInt(hday)) {
/*  729: 386 */       return 1;
/*  730:     */     }
/*  731: 388 */     if (Integer.parseInt(bday) < Integer.parseInt(hday)) {
/*  732: 390 */       return 2;
/*  733:     */     }
/*  734: 392 */     return 3;
/*  735:     */   }
/*  736:     */   
/*  737:     */   private static String doQyeryDateView()
/*  738:     */     throws ServletException, IOException
/*  739:     */   {
/*  740: 404 */     ConnectionPoolBean handler = ConnectionPoolBean.getHandle();
/*  741: 405 */     Connection conn = null;
/*  742: 406 */     String last_ref_date = "no";
/*  743:     */     try
/*  744:     */     {
/*  745: 409 */       conn = handler.getConnection();
/*  746: 410 */       if (conn != null)
/*  747:     */       {
/*  748: 412 */         PreparedStatement stmt = null;
/*  749:     */         try
/*  750:     */         {
/*  751: 415 */           String Sqls = "select to_char(last_refresh,'yyyy-mm-dd') as l_refdate from htjs.user_snapshots where table_name ='rz_fpdml_mx' ";
/*  752: 416 */           stmt = conn.prepareStatement(Sqls, 1003, 1007);
/*  753: 417 */           ResultSet rs = stmt.executeQuery();
/*  754: 419 */           while (rs.next()) {
/*  755: 421 */             last_ref_date = rs.getString("l_refdate");
/*  756:     */           }
/*  757: 424 */           stmt.close();
/*  758:     */           
/*  759: 426 */           return last_ref_date;
/*  760:     */         }
/*  761:     */         catch (SQLException e)
/*  762:     */         {
/*  763:     */           String str1;
/*  764: 431 */           System.out.println("[ERROR] 数据库操作异常，异常信息为：" + e.toString());
/*  765: 432 */           last_ref_date = "error";
/*  766: 433 */           return last_ref_date;
/*  767:     */         }
/*  768:     */         finally
/*  769:     */         {
/*  770: 437 */           if (stmt != null) {
/*  771: 439 */             stmt.close();
/*  772:     */           }
/*  773: 441 */           if (conn != null)
/*  774:     */           {
/*  775: 443 */             handler.closeConnection(conn);
/*  776: 444 */             conn = null;
/*  777:     */           }
/*  778:     */         }
/*  779:     */       }
/*  780: 450 */       System.out.println("[ERROR] 数据库连接失败 ！");
/*  781: 451 */       return "error";
/*  782:     */     }
/*  783:     */     catch (SQLException e)
/*  784:     */     {
/*  785: 457 */       System.out.println("[ERROR] 数据库操作异常，异常信息为：" + e.toString());
/*  786: 458 */       last_ref_date = "error";
/*  787:     */     }
/*  788: 459 */     return last_ref_date;
/*  789:     */   }
/*  790:     */   
/*  791:     */   public static void doQuerySjrzSecurity(TranslateParaCmdBean req, HttpServletResponse res)
/*  792:     */     throws ServletException, IOException
/*  793:     */   {
/*  794: 475 */     ConnectionPoolBean handler = ConnectionPoolBean.getHandle();
/*  795: 476 */     Connection conn = null;
/*  796:     */     
/*  797: 478 */     String CXFS = req.getParameter("cxfs") == null ? "" : req.getParameter("cxfs");
/*  798: 480 */     if (CXFS.equals("ver"))
/*  799:     */     {
/*  800: 483 */       doDownloadSecurity(req, res, "version.txt", "0");
/*  801: 484 */       return;
/*  802:     */     }
/*  803: 487 */     if (CXFS.equals("dlver"))
/*  804:     */     {
/*  805: 490 */       doDownloadSecurity(req, res, "dlversion.txt", "0");
/*  806: 491 */       return;
/*  807:     */     }
/*  808: 493 */     if (CXFS.equals("downld"))
/*  809:     */     {
/*  810: 498 */       doDownloadSecurity(req, res, req.getParameter("file"), req.getParameter("from"));
/*  811: 499 */       return;
/*  812:     */     }
/*  813: 502 */     res.setContentType("text/html; charset=gb2312");
/*  814: 503 */     PrintWriter out = res.getWriter();
/*  815:     */     
/*  816:     */ 
/*  817:     */ 
/*  818: 507 */     java.sql.Date dt = new java.sql.Date(System.currentTimeMillis());
/*  819: 508 */     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
/*  820: 509 */     String rz_sjstr = sdf.format(dt);
/*  821:     */     try
/*  822:     */     {
/*  823: 513 */       conn = handler.getConnection();
/*  824: 514 */       if (conn != null)
/*  825:     */       {
/*  826: 517 */         String NSRSBH = req.getParameter("nsrsbh") == null ? "" : req.getParameter("nsrsbh");
/*  827: 518 */         String CZYDM = req.getParameter("czydm") == null ? "" : req.getParameter("czydm");
/*  828: 519 */         String CZYPWD = req.getParameter("passwd") == null ? "" : req.getParameter("passwd");
/*  829: 520 */         CXFS = req.getParameter("cxfs") == null ? "" : req.getParameter("cxfs");
/*  830:     */         
/*  831:     */ 
/*  832: 523 */         String fplx = req.getParameter("fplx") == null ? "A" : req.getParameter("fplx");
/*  833: 524 */         String gdzc = req.getParameter("gd") == null ? "A" : req.getParameter("gd");
/*  834:     */         
/*  835:     */ 
/*  836:     */ 
/*  837: 528 */         String RzjgSqls = "";
/*  838: 529 */         if (fplx.equals("A")) {
/*  839: 531 */           RzjgSqls = " ";
/*  840: 533 */         } else if (fplx.equals("Z")) {
/*  841: 535 */           RzjgSqls = " AND FP_LB='YB' ";
/*  842: 537 */         } else if (fplx.equals("F")) {
/*  843: 539 */           RzjgSqls = " AND FP_LB='FJ' ";
/*  844:     */         }
/*  845: 542 */         if (gdzc.equals("A")) {
/*  846: 544 */           RzjgSqls = RzjgSqls + " ";
/*  847: 546 */         } else if (gdzc.equals("Y")) {
/*  848: 548 */           RzjgSqls = RzjgSqls + " AND GDZC_BZ='Y' ";
/*  849: 550 */         } else if (gdzc.equals("N")) {
/*  850: 552 */           RzjgSqls = RzjgSqls + " AND GDZC_BZ='N' ";
/*  851:     */         }
/*  852: 558 */         String Sqls = "";boolean forprint = false;
/*  853: 559 */         int RZYF = 0;String QSRQ = "";String ZZRQ = "";
/*  854: 560 */         if (CXFS.equals("0"))
/*  855:     */         {
/*  856: 562 */           RZYF = Integer.parseInt(req.getParameter("rzyf"));
/*  857: 563 */           Sqls = "SELECT SWJG_DM,RZ_YF as RZYF,RZ_NSRSBH AS NSRSBH,RZ_JG AS RZJG,RZ_SJ AS RZSJ,1 AS TJCS,FPDM,FPHM,FP_KPRQ,GF_NSRSBH AS FPGF,XF_NSRSBH AS FPXF,JE AS FPJE,SL AS FPSL,SE AS FPSE,FP_MW AS FP_MW,CZY_DM,'server' as CZY_MC,RZ_RGJZ_BZ AS RGJZ,JSKH,'5' AS RZFS,' ' as FPID,RZ_WXYY AS WXYY,RZ_JG AS RZJGFL,'' as YJBS FROM htjs.RZ_FPDKL_MX WHERE RZ_NSRSBH='" + 
/*  858: 564 */             NSRSBH + "' AND RZ_YF=" + RZYF + " and rz_jg=0";
/*  859:     */         }
/*  860: 567 */         else if (CXFS.equals("1"))
/*  861:     */         {
/*  862: 569 */           QSRQ = req.getParameter("dfrom");
/*  863: 570 */           ZZRQ = req.getParameter("dto");
/*  864:     */           
/*  865: 572 */           Sqls = "SELECT SWJG_DM,RZ_YF as RZYF,RZ_NSRSBH AS NSRSBH,RZ_JG AS RZJG,RZ_SJ AS RZSJ,1 AS TJCS,FPDM,FPHM,FP_KPRQ,GF_NSRSBH AS FPGF,XF_NSRSBH AS FPXF,JE AS FPJE,SL AS FPSL,SE AS FPSE,FP_MW AS FP_MW,CZY_DM,'server' as CZY_MC,RZ_RGJZ_BZ AS RGJZ,JSKH,'5' AS RZFS,' ' as FPID,RZ_WXYY AS WXYY,RZ_JG AS RZJGFL,'' as YJBS  FROM htjs.RZ_FPDKL_MX WHERE RZ_NSRSBH='" + 
/*  866: 573 */             NSRSBH + "' AND to_char(RZ_SJ,'yyyy-mm-dd') >='" + QSRQ + "' AND to_char(RZ_SJ,'yyyy-mm-dd')<='" + ZZRQ + "' and rz_jg=0 ";
/*  867:     */         }
/*  868: 576 */         else if (CXFS.equals("10"))
/*  869:     */         {
/*  870: 578 */           RZYF = Integer.parseInt(req.getParameter("rzyf"));
/*  871: 579 */           forprint = true;
/*  872: 580 */           Sqls = "select count(*) as fs,sum(je) as je,sum(se) as se  From htjs.rz_fpdkl_mx where rz_nsrsbh='" + NSRSBH + "' AND RZ_YF=" + RZYF + " and rz_jg='0' " + RzjgSqls;
/*  873:     */         }
/*  874: 582 */         else if (CXFS.equals("11"))
/*  875:     */         {
/*  876: 584 */           QSRQ = req.getParameter("dfrom");
/*  877: 585 */           ZZRQ = req.getParameter("dto");
/*  878: 586 */           forprint = true;
/*  879: 587 */           Sqls = "SELECT count(*) as fs ,sum(JE) AS JE,sum(SE) AS SE FROM htjs.RZ_FPDKL_MX WHERE RZ_NSRSBH='" + NSRSBH + "' AND RZ_SJ>=To_Date('" + QSRQ + "','yyyy-mm-dd') AND RZ_SJ<=To_Date('" + ZZRQ + "','yyyy-mm-dd') and rz_jg='0' " + RzjgSqls;
/*  880:     */         }
/*  881: 589 */         else if (CXFS.equals("20"))
/*  882:     */         {
/*  883: 591 */           RZYF = Integer.parseInt(req.getParameter("rzyf"));
/*  884: 592 */           Sqls = "SELECT SWJG_DM,RZ_YF as RZYF,RZ_NSRSBH AS NSRSBH,RZ_JG AS RZJG,RZ_SJ AS RZSJ,1 AS TJCS,FPDM,FPHM,FP_KPRQ,GF_NSRSBH AS FPGF,XF_NSRSBH AS FPXF,JE AS FPJE,SL AS FPSL,SE AS FPSE,FP_MW AS FP_MW,CZY_DM,'server' as CZY_MC,RZ_RGJZ_BZ AS RGJZ,JSKH,'5' AS RZFS,' ' as FPID,RZ_WXYY AS WXYY,RZ_JG AS RZJGFL,'' as YJBS,FP_LB,GDZC_BZ FROM htjs.RZ_FPDKL_MX WHERE RZ_NSRSBH='" + 
/*  885: 593 */             NSRSBH + "' AND RZ_YF=" + RZYF + " and rz_jg=0 " + RzjgSqls;
/*  886:     */         }
/*  887: 595 */         else if (CXFS.equals("21"))
/*  888:     */         {
/*  889: 597 */           QSRQ = req.getParameter("dfrom");
/*  890: 598 */           ZZRQ = req.getParameter("dto");
/*  891: 599 */           Sqls = "SELECT SWJG_DM,RZ_YF as RZYF,RZ_NSRSBH AS NSRSBH,RZ_JG AS RZJG,RZ_SJ AS RZSJ,1 AS TJCS,FPDM,FPHM,FP_KPRQ,GF_NSRSBH AS FPGF,XF_NSRSBH AS FPXF,JE AS FPJE,SL AS FPSL,SE AS FPSE,FP_MW AS FP_MW,CZY_DM,'server' as CZY_MC,RZ_RGJZ_BZ AS RGJZ,JSKH,'5' AS RZFS,' ' as FPID,RZ_WXYY AS WXYY,RZ_JG AS RZJGFL,'' as YJBS,FP_LB,GDZC_BZ  FROM htjs.RZ_FPDKL_MX WHERE RZ_NSRSBH='" + 
/*  892: 600 */             NSRSBH + "' AND To_char(RZ_SJ,'yyyy-mm-dd')>='" + QSRQ + "' AND to_char(RZ_SJ,'yyyy-mm-dd')<='" + ZZRQ + "' and rz_jg=0 " + RzjgSqls;
/*  893:     */         }
/*  894: 603 */         int RecCount = 0;
/*  895: 604 */         PreparedStatement stmt = null;
/*  896:     */         try
/*  897:     */         {
/*  898: 608 */           stmt = conn.prepareStatement(Sqls, 1003, 1007);
/*  899: 609 */           ResultSet reDataSet = stmt.executeQuery();
/*  900: 611 */           while (reDataSet.next())
/*  901:     */           {
/*  902: 613 */             if (RecCount == 0)
/*  903:     */             {
/*  904: 615 */               System.out.println("[INFO] 查询成功 ");
/*  905: 616 */               out.println("100");
/*  906: 617 */               out.println("查询成功！");
/*  907: 618 */               out.println(rz_sjstr);
/*  908: 619 */               out.println();
/*  909:     */             }
/*  910: 621 */             if (forprint)
/*  911:     */             {
/*  912: 623 */               out.print(reDataSet.getInt("fs") + "*");
/*  913:     */               
/*  914: 625 */               NumberFormat nf = NumberFormat.getInstance();
/*  915: 626 */               nf.setGroupingUsed(false);
/*  916: 627 */               nf.setMinimumFractionDigits(2);
/*  917: 628 */               nf.setMaximumFractionDigits(2);
/*  918:     */               
/*  919: 630 */               out.print(nf.format(reDataSet.getDouble("JE")) + "*");
/*  920: 631 */               out.print(nf.format(reDataSet.getDouble("SE")));
/*  921:     */             }
/*  922:     */             else
/*  923:     */             {
/*  924: 635 */               out.print(reDataSet.getString(1) + " ");
/*  925: 636 */               out.print(reDataSet.getInt(2) + " ");
/*  926: 637 */               out.print(reDataSet.getString(3) + " ");
/*  927: 638 */               out.print(reDataSet.getInt(4) + " ");
/*  928: 639 */               out.print(reDataSet.getString(5) + " ");
/*  929: 640 */               out.print(reDataSet.getInt(6) + " ");
/*  930: 641 */               out.print(reDataSet.getString(7) + " ");
/*  931: 642 */               out.print(reDataSet.getString(8) + " ");
/*  932: 643 */               out.print(reDataSet.getDate(9) + " ");
/*  933: 644 */               out.print(reDataSet.getString(10) + " ");
/*  934: 645 */               out.print(reDataSet.getString(11) + " ");
/*  935: 646 */               out.print(reDataSet.getDouble(12) + " ");
/*  936: 647 */               out.print(reDataSet.getString(13) + " ");
/*  937: 648 */               out.print(reDataSet.getDouble(14) + " ");
/*  938: 649 */               out.print(reDataSet.getString(15) + " ");
/*  939: 650 */               out.print(reDataSet.getString(16) + " ");
/*  940: 651 */               out.print(reDataSet.getString(17) + " ");
/*  941: 652 */               out.print(reDataSet.getString(18) + " ");
/*  942: 653 */               out.print(reDataSet.getString(19) + " ");
/*  943: 654 */               out.print(reDataSet.getString(20) + " ");
/*  944: 655 */               out.print(reDataSet.getString(21) + " ");
/*  945: 656 */               out.print(reDataSet.getInt(22) + " ");
/*  946: 657 */               out.print(reDataSet.getString(23) + " ");
/*  947: 658 */               if ((CXFS.equals("20")) || (CXFS.equals("21")))
/*  948:     */               {
/*  949: 660 */                 out.print(reDataSet.getString(24) + " ");
/*  950: 661 */                 out.print(reDataSet.getString(25) + " ");
/*  951: 662 */                 out.println(reDataSet.getString(26) + " ");
/*  952:     */               }
/*  953:     */               else
/*  954:     */               {
/*  955: 666 */                 out.println(reDataSet.getString(24) + " ");
/*  956:     */               }
/*  957:     */             }
/*  958: 670 */             RecCount++;
/*  959:     */           }
/*  960: 672 */           if (RecCount == 0)
/*  961:     */           {
/*  962: 674 */             out.println("201");
/*  963: 675 */             out.println("查询记录数为0！");
/*  964: 676 */             out.println(rz_sjstr);
/*  965:     */           }
/*  966:     */         }
/*  967:     */         catch (SQLException e)
/*  968:     */         {
/*  969: 681 */           out.println("203");
/*  970: 682 */           out.println("数据库操作异常，异常信息为：" + e.toString().replace('\n', ' '));
/*  971: 683 */           System.out.println("[ERROR] 数据库操作异常，异常信息为：" + e.toString().replace('\n', ' '));
/*  972: 684 */           out.println(rz_sjstr);
/*  973:     */         }
/*  974:     */         finally
/*  975:     */         {
/*  976: 688 */           if (stmt != null) {
/*  977: 690 */             stmt.close();
/*  978:     */           }
/*  979:     */         }
/*  980:     */       }
/*  981:     */     }
/*  982:     */     catch (Exception e)
/*  983:     */     {
/*  984: 697 */       out.println("204");
/*  985: 698 */       out.println("有异常发生，异常信息为：" + e.toString().replace('\n', ' '));
/*  986: 699 */       System.out.println("[ERROR] 有异常发生，异常信息为：" + e.toString().replace('\n', ' '));
/*  987: 700 */       out.println(rz_sjstr);
/*  988:     */     }
/*  989:     */     finally
/*  990:     */     {
/*  991: 704 */       if (conn != null)
/*  992:     */       {
/*  993: 706 */         handler.closeConnection(conn);
/*  994: 707 */         conn = null;
/*  995:     */       }
/*  996:     */       else
/*  997:     */       {
/*  998: 711 */         out.println("202");
/*  999: 712 */         out.println("连接数据库失败！");
/* 1000: 713 */         out.println(rz_sjstr);
/* 1001:     */       }
/* 1002:     */     }
/* 1003:     */   }
/* 1004:     */   
/* 1005:     */   public static void doDownloadSecurity(TranslateParaCmdBean req, HttpServletResponse res, String filename, String from)
/* 1006:     */     throws ServletException, IOException
/* 1007:     */   {
/* 1008: 733 */     FileInputStream fi = null;
/* 1009:     */     
/* 1010:     */ 
/* 1011:     */ 
/* 1012: 737 */     int dfrom = Integer.parseInt(from);
/* 1013: 738 */     byte[] data = new byte[8192];
/* 1014: 740 */     if ((!filename.equals("version.txt")) || (!filename.equals("dlversion.txt"))) {
/* 1015: 741 */       System.out.println("[INFO] " + req.getParameter("nsrsbh: ") + "download " + filename + ", " + dfrom);
/* 1016:     */     }
/* 1017: 743 */     String rzPath = "";
/* 1018: 744 */     filename = filename.trim();
/* 1019: 745 */     int FileLen = filename.length();
/* 1020: 747 */     if (filename.substring(FileLen - 4, FileLen).equals(".pdf")) {
/* 1021: 749 */       rzPath = rzPath + "print/" + filename;
/* 1022:     */     } else {
/* 1023: 753 */       rzPath = rzPath + "wlrz/" + filename;
/* 1024:     */     }
/* 1025: 756 */     File file = new File(rzPath);
/* 1026: 757 */     int len = (int)file.length();
/* 1027:     */     
/* 1028: 759 */     fi = new FileInputStream(file);
/* 1029:     */     
/* 1030:     */ 
/* 1031: 762 */     res.setContentType("application/octet-stream");
/* 1032: 763 */     res.setContentLength(len - dfrom);
/* 1033:     */     
/* 1034: 765 */     ServletOutputStream out = res.getOutputStream();
/* 1035:     */     int count;
/* 1036: 767 */     if ((count = fi.read(data, dfrom, 8192)) > -1)
/* 1037:     */     {
/* 1038: 769 */       out.write(data, 0, count);
/* 1039: 771 */       while ((count = fi.read(data)) > -1) {
/* 1040: 773 */         out.write(data, 0, count);
/* 1041:     */       }
/* 1042:     */     }
/* 1043: 777 */     fi.close();
/* 1044:     */   }
/* 1045:     */   
/* 1046:     */   public static int doDelete(HttpServletResponse res, TranslateParaCmdBean req)
/* 1047:     */     throws ServletException, IOException
/* 1048:     */   {
/* 1049: 795 */     int reInt = 0;
/* 1050: 796 */     System.out.println("[INFO] NSRSBH: " + req.getParameter("nsrsbh"));
/* 1051: 797 */     System.out.println("[INFO] FPDM: " + req.getParameter("fpdm"));
/* 1052: 798 */     System.out.println("[INFO] FPHM: " + req.getParameter("fphm"));
/* 1053: 799 */     System.out.println("[INFO] RZYF: " + req.getParameter("rzyf"));
/* 1054: 800 */     System.out.println("[INFO] RZSJ: " + req.getParameter("rzsj"));
/* 1055:     */     
/* 1056: 802 */     Calendar today = Calendar.getInstance();
/* 1057: 803 */     java.util.Date dt = today.getTime();
/* 1058: 804 */     SimpleDateFormat sdf = new SimpleDateFormat("yyyyMM");
/* 1059: 805 */     String currTime = sdf.format(dt);
/* 1060:     */     
/* 1061: 807 */     System.out.println("[INFO] currTime is: " + currTime);
/* 1062:     */     
/* 1063: 809 */     String mnsr = req.getParameter("nsrsbh");
/* 1064: 810 */     String mfpdm = req.getParameter("fpdm");
/* 1065: 811 */     String mfphm = req.getParameter("fphm");
/* 1066: 813 */     if (req.getParameter("rzyf") == null) {
/* 1067: 814 */       return 4;
/* 1068:     */     }
/* 1069: 815 */     int myf = Integer.parseInt(req.getParameter("rzyf"));
/* 1070:     */     
/* 1071:     */ 
/* 1072: 818 */     String msj = req.getParameter("rzsj");
/* 1073:     */     
/* 1074: 820 */     ConnectionPoolBean handler = ConnectionPoolBean.getHandle();
/* 1075: 821 */     Connection conn = null;
/* 1076:     */     
/* 1077: 823 */     PreparedStatement stmt = null;
/* 1078: 826 */     if (msj.length() == 5)
/* 1079:     */     {
/* 1080: 828 */       msj = msj.substring(0, 4) + "0" + msj.substring(4, 5);
/* 1081: 829 */       System.out.println("[INFO] revise month format : " + msj);
/* 1082:     */     }
/* 1083: 833 */     String sSqlstmt = "select rz_nsrsbh,fpdm,fphm,rz_yf,to_char(rz_sj,'yyyymm') as rz_sj from htjs.rz_fpdkl_mx where rz_nsrsbh='" + mnsr + "' and fpdm='" + mfpdm + "' and fphm='" + mfphm + "'";
/* 1084:     */     try
/* 1085:     */     {
/* 1086: 837 */       conn = conn = handler.getConnection();
/* 1087: 838 */       if (conn != null) {
/* 1088:     */         try
/* 1089:     */         {
/* 1090: 842 */           stmt = conn.prepareStatement(sSqlstmt);
/* 1091: 843 */           ResultSet rs = stmt.executeQuery();
/* 1092: 844 */           if (rs.next())
/* 1093:     */           {
/* 1094: 846 */             if ((!rs.getString("rz_nsrsbh").equals(mnsr)) || (!rs.getString("fpdm").equals(mfpdm)) || (!rs.getString("fphm").equals(mfphm))) {
/* 1095: 848 */               System.out.println("[INFO] doDelete return 2");
/* 1096:     */             }
/* 1097:     */           }
/* 1098:     */           else
/* 1099:     */           {
/* 1100: 884 */             if (stmt != null) {
/* 1101: 885 */               stmt.close();
/* 1102:     */             }
/* 1103: 849 */             return 2;
/* 1104:     */           }
/* 1105:     */           ResultSet rs;
/* 1106: 851 */           if ((rs.getInt("rz_yf") != myf) || (!rs.getString("rz_sj").equals(currTime)))
/* 1107:     */           {
/* 1108: 853 */             System.out.println("[INFO] doDelete return 3");
/* 1109: 884 */             if (stmt != null) {
/* 1110: 885 */               stmt.close();
/* 1111:     */             }
/* 1112: 854 */             return 3;
/* 1113:     */           }
/* 1114: 861 */           ResultSet rs = null;
/* 1115: 862 */           stmt = null;
/* 1116:     */           
/* 1117: 864 */           sSqlstmt = "delete HTJS.rz_fpdkl_mx where rz_nsrsbh = '" + mnsr + "'and fpdm='" + mfpdm + "' and fphm='" + mfphm + "' and rz_jg=0 and rz_yf=" + myf + " and to_char(rz_sj,'yyyymm')='" + msj + "'";
/* 1118:     */           
/* 1119:     */ 
/* 1120: 867 */           stmt = conn.prepareStatement(sSqlstmt);
/* 1121: 868 */           int deli = stmt.executeUpdate();
/* 1122:     */           
/* 1123: 870 */           conn.commit();
/* 1124: 884 */           if (stmt != null) {
/* 1125: 885 */             stmt.close();
/* 1126:     */           }
/* 1127: 871 */           return 1;
/* 1128:     */         }
/* 1129:     */         catch (SQLException e)
/* 1130:     */         {
/* 1131: 876 */           System.out.println("[ERROR] WlrzYcrzcxCmdBean.dodelete check error " + e.toString());
/* 1132: 884 */           if (stmt != null) {
/* 1133: 885 */             stmt.close();
/* 1134:     */           }
/* 1135: 878 */           return 4;
/* 1136:     */         }
/* 1137:     */         finally
/* 1138:     */         {
/* 1139: 884 */           if (stmt != null) {
/* 1140: 885 */             stmt.close();
/* 1141:     */           }
/* 1142:     */         }
/* 1143:     */       }
/* 1144: 899 */       handler = null;
/* 1145:     */     }
/* 1146:     */     catch (SQLException e)
/* 1147:     */     {
/* 1148: 892 */       System.out.println("[ERROR] WlrzYcrzcxCmdBean.dodelete error " + e.toString());
/* 1149: 893 */       return 4;
/* 1150:     */     }
/* 1151:     */     finally
/* 1152:     */     {
/* 1153: 899 */       handler = null;
/* 1154: 900 */       conn = null;
/* 1155:     */     }
/* 1156: 900 */     conn = null;
/* 1157:     */     
/* 1158: 902 */     return 4;
/* 1159:     */   }
/* 1160:     */   
/* 1161:     */   public static void doCountNsr(HttpServletResponse res, HttpServletRequest req)
/* 1162:     */     throws ServletException, IOException
/* 1163:     */   {
/* 1164: 919 */     int reInt = 0;
/* 1165: 920 */     System.out.println("[INFO] action" + req.getParameter("action"));
/* 1166:     */     
/* 1167: 922 */     String mnsr = req.getParameter("nsrsbh");
/* 1168:     */     
/* 1169: 924 */     ConnectionPoolBean handler = ConnectionPoolBean.getHandle();
/* 1170: 925 */     Connection conn = null;
/* 1171:     */     
/* 1172: 927 */     String CXFS = req.getParameter("cxfs") == null ? "" : req.getParameter("cxfs");
/* 1173:     */     
/* 1174: 929 */     PreparedStatement stmt = null;
/* 1175:     */     
/* 1176: 931 */     String sSqlstmt = "select nsrsbh,to_char(khrq,'yyyymm') As khrz,to_char(jzrq,'yyyymm') As jzrq from wsrz_qy_khxx t ";
/* 1177: 933 */     if (CXFS.equals("all")) {
/* 1178: 934 */       sSqlstmt = "select count(*) as hs from htjs.wlrz_qy_khxx ";
/* 1179:     */     }
/* 1180: 935 */     PrintWriter out = res.getWriter();
/* 1181: 936 */     int RecCount = 0;
/* 1182:     */     try
/* 1183:     */     {
/* 1184: 939 */       conn = conn = handler.getConnection();
/* 1185: 940 */       if (conn != null) {
/* 1186:     */         try
/* 1187:     */         {
/* 1188: 944 */           stmt = conn.prepareStatement(sSqlstmt);
/* 1189: 945 */           ResultSet reDataSet = stmt.executeQuery();
/* 1190: 946 */           res.setContentType("text/html; charset=gb2312");
/* 1191: 948 */           while (reDataSet.next())
/* 1192:     */           {
/* 1193: 950 */             if (RecCount == 0)
/* 1194:     */             {
/* 1195: 952 */               System.out.println("[INFO] 查询成功");
/* 1196: 953 */               out.println("100");
/* 1197: 954 */               out.println("查询成功！");
/* 1198: 955 */               out.println();
/* 1199:     */             }
/* 1200: 957 */             if (CXFS.equals("all"))
/* 1201:     */             {
/* 1202: 958 */               out.print(reDataSet.getInt(1) + " ");
/* 1203:     */             }
/* 1204:     */             else
/* 1205:     */             {
/* 1206: 961 */               out.print(reDataSet.getString(1) + " ");
/* 1207: 962 */               out.print(reDataSet.getString(2) + " ");
/* 1208: 963 */               out.print(reDataSet.getString(3) + " ");
/* 1209:     */             }
/* 1210: 966 */             RecCount++;
/* 1211:     */           }
/* 1212: 968 */           if (RecCount == 0)
/* 1213:     */           {
/* 1214: 970 */             out.println("101");
/* 1215: 971 */             out.println("查询记录数为0！");
/* 1216:     */           }
/* 1217: 974 */           reDataSet = null;
/* 1218: 975 */           stmt = null;
/* 1219:     */         }
/* 1220:     */         catch (SQLException e)
/* 1221:     */         {
/* 1222: 979 */           System.out.println("[ERROR] WlrzYcrzcxCmdBean.doCountNsr error " + e.toString());
/* 1223: 980 */           res.setContentType("text/html; charset=gb2312");
/* 1224: 981 */           out.println("200");
/* 1225: 982 */           out.println("查询过程出现异常！" + e.toString());
/* 1226: 983 */           out.println();
/* 1227:     */         }
/* 1228:     */         finally
/* 1229:     */         {
/* 1230: 988 */           if (stmt != null) {
/* 1231: 989 */             stmt.close();
/* 1232:     */           }
/* 1233:     */         }
/* 1234:     */       }
/* 1235:     */     }
/* 1236:     */     catch (SQLException e)
/* 1237:     */     {
/* 1238: 996 */       res.setContentType("text/html; charset=gb2312");
/* 1239: 997 */       out.println("200");
/* 1240: 998 */       out.println("查询过程出现异常！" + e.toString());
/* 1241: 999 */       out.println();
/* 1242:     */     }
/* 1243:     */     finally
/* 1244:     */     {
/* 1245:1004 */       handler = null;
/* 1246:1005 */       conn = null;
/* 1247:     */     }
/* 1248:     */   }
/* 1249:     */   
/* 1250:     */   public static void doUpdatePwd(HttpServletResponse res, TranslateParaCmdBean req)
/* 1251:     */     throws ServletException, IOException
/* 1252:     */   {
/* 1253:1020 */     int reInt = 0;
/* 1254:     */     
/* 1255:1022 */     String mnsr = req.getParameter("nsrsbh") == null ? "N" : req.getParameter("nsrsbh");
/* 1256:1023 */     String Czydm = req.getParameter("czydm") == null ? "N" : req.getParameter("czydm");
/* 1257:1024 */     String pwd = req.getParameter("pwd") == null ? "N" : req.getParameter("pwd");
/* 1258:1025 */     String newpwd = req.getParameter("newpwd") == null ? "N" : req.getParameter("newpwd");
/* 1259:     */     
/* 1260:     */ 
/* 1261:     */ 
/* 1262:1029 */     ConnectionPoolBean handler = ConnectionPoolBean.getHandle();
/* 1263:1030 */     Connection conn = null;
/* 1264:     */     
/* 1265:     */ 
/* 1266:     */ 
/* 1267:1034 */     PreparedStatement stmt = null;
/* 1268:     */     
/* 1269:1036 */     String sSqlstmt = " select count(*) as hs from wsrz_qy_khxx where NSRSBH = '" + mnsr + "' and czypwd='" + pwd + "'";
/* 1270:     */     
/* 1271:1038 */     res.setContentType("text/html; charset=gb2312");
/* 1272:1039 */     PrintWriter out = res.getWriter();
/* 1273:     */     
/* 1274:1041 */     int RecCount = 0;
/* 1275:     */     try
/* 1276:     */     {
/* 1277:1044 */       conn = conn = handler.getConnection();
/* 1278:1045 */       if (conn != null)
/* 1279:     */       {
/* 1280:     */         try
/* 1281:     */         {
/* 1282:1049 */           stmt = conn.prepareStatement(sSqlstmt);
/* 1283:     */           
/* 1284:     */ 
/* 1285:1052 */           ResultSet reDataSet = stmt.executeQuery();
/* 1286:     */           break label262;
/* 1287:1057 */           RecCount = reDataSet.getInt("hs");
/* 1288:1059 */           if (RecCount == 0)
/* 1289:     */           {
/* 1290:1061 */             System.out.println("[INFO] 当前企业在开户信息表中不存在 ");
/* 1291:1062 */             out.println("1");
/* 1292:1063 */             out.println("当前企业在开户信息表中不存在,或输入原密码错误！");
/* 1293:     */           }
/* 1294:     */           for (;;)
/* 1295:     */           {
/* 1296:1105 */             if (stmt != null) {
/* 1297:1106 */               stmt.close();
/* 1298:     */             }
/* 1299:     */             return;
/* 1300:     */             label262:
/* 1301:1055 */             if (reDataSet.next()) {
/* 1302:     */               break;
/* 1303:     */             }
/* 1304:1068 */             if (RecCount == 0) {
/* 1305:     */               break label421;
/* 1306:     */             }
/* 1307:1070 */             sSqlstmt = " update wsrz_qy_khxx set czypwd= '" + newpwd + "' where NSRSBH = '" + mnsr + "' ";
/* 1308:     */             
/* 1309:1072 */             stmt = conn.prepareStatement(sSqlstmt);
/* 1310:1073 */             System.out.println("[info] update sql: " + sSqlstmt);
/* 1311:1074 */             reInt = stmt.executeUpdate();
/* 1312:1075 */             System.out.println("[info] doupdate " + reInt);
/* 1313:1076 */             if (reInt > 0)
/* 1314:     */             {
/* 1315:1078 */               out.println("0");
/* 1316:1079 */               out.println("当前企业密码修改成功！");
/* 1317:     */             }
/* 1318:     */             else
/* 1319:     */             {
/* 1320:1084 */               out.println("2");
/* 1321:1085 */               out.println("当前企业密码修改失败！");
/* 1322:     */             }
/* 1323:     */           }
/* 1324:     */           label421:
/* 1325:1091 */           ResultSet reDataSet = null;
/* 1326:1092 */           stmt = null;
/* 1327:     */         }
/* 1328:     */         catch (SQLException e)
/* 1329:     */         {
/* 1330:1096 */           System.out.println("[ERROR] 企业密码修改：" + e.toString());
/* 1331:     */           
/* 1332:1098 */           out.println("3");
/* 1333:1099 */           out.println("修改密码过程出现异常！" + e.toString());
/* 1334:1100 */           out.println();
/* 1335:     */         }
/* 1336:     */         finally
/* 1337:     */         {
/* 1338:1105 */           if (stmt != null) {
/* 1339:1106 */             stmt.close();
/* 1340:     */           }
/* 1341:     */         }
/* 1342:     */       }
/* 1343:     */       else
/* 1344:     */       {
/* 1345:1111 */         out.println("4");
/* 1346:1112 */         out.println("数据库连接出现其它异常！");
/* 1347:1113 */         out.println();
/* 1348:     */       }
/* 1349:     */     }
/* 1350:     */     catch (SQLException e)
/* 1351:     */     {
/* 1352:1120 */       out.println("3");
/* 1353:1121 */       out.println("查询过程出现异常！" + e.toString());
/* 1354:1122 */       out.println();
/* 1355:     */     }
/* 1356:     */     finally
/* 1357:     */     {
/* 1358:1127 */       handler = null;
/* 1359:1128 */       conn = null;
/* 1360:     */     }
/* 1361:     */   }
/* 1362:     */   
/* 1363:     */   public static String doQueryXmlMx(String nsrsbh, String yf, String brq, String drq, String cxfs, String fplx, String gd)
/* 1364:     */     throws ServletException, IOException
/* 1365:     */   {
/* 1366:1142 */     ConnectionPoolBean handler = ConnectionPoolBean.getHandle();
/* 1367:1143 */     Connection conn = null;
/* 1368:1144 */     PreparedStatement stmt = null;
/* 1369:     */     try
/* 1370:     */     {
/* 1371:1148 */       conn = handler.getConnection();
/* 1372:1149 */       if (conn != null)
/* 1373:     */       {
/* 1374:1151 */         String Sqls = "";
/* 1375:1152 */         String RzjgSqls = "";
/* 1376:1153 */         if (fplx.equals("A")) {
/* 1377:1155 */           RzjgSqls = " ";
/* 1378:1157 */         } else if (fplx.equals("Z")) {
/* 1379:1159 */           RzjgSqls = " AND FP_LB='YB' ";
/* 1380:1161 */         } else if (fplx.equals("F")) {
/* 1381:1163 */           RzjgSqls = " AND FP_LB='FJ' ";
/* 1382:     */         }
/* 1383:1165 */         if (gd.equals("A")) {
/* 1384:1167 */           RzjgSqls = RzjgSqls + " ";
/* 1385:1169 */         } else if (gd.equals("Y")) {
/* 1386:1171 */           RzjgSqls = RzjgSqls + " AND GDZC_BZ='Y' ";
/* 1387:1173 */         } else if (gd.equals("N")) {
/* 1388:1175 */           RzjgSqls = RzjgSqls + " AND GDZC_BZ='N' ";
/* 1389:     */         }
/* 1390:     */         try
/* 1391:     */         {
/* 1392:1180 */           if (cxfs.equals("20")) {
/* 1393:1182 */             Sqls = 
/* 1394:1183 */               "SELECT XF_QYMC,GF_QYMC,QD_BZ,RZ_YF as RZYF,RZ_NSRSBH AS NSRSBH,RZ_SJ AS RZSJ,1 AS TJCS,FPDM,FPHM,FP_KPRQ,GF_NSRSBH AS FPGF,XF_NSRSBH AS FPXF,JE AS FPJE,SL AS FPSL,SE AS FPSE,FP_MW AS FP_MW,RZ_RGJZ_BZ AS RGJZ,RZ_WXYY AS WXYY,RZ_JG AS RZJGFL,FP_LB,GDZC_BZ FROM htjs.RZ_FPDKL_MX WHERE RZ_NSRSBH='" + nsrsbh + "' AND RZ_YF=" + yf + " and rz_jg=0 " + RzjgSqls;
/* 1395:1187 */           } else if (cxfs.equals("21")) {
/* 1396:1189 */             if ((brq.equals("no")) && (!drq.equals("no"))) {
/* 1397:1191 */               Sqls = 
/* 1398:1192 */                 "SELECT XF_QYMC,GF_QYMC,QD_BZ,RZ_YF as RZYF,RZ_NSRSBH AS NSRSBH,RZ_SJ AS RZSJ,1 AS TJCS,FPDM,FPHM,FP_KPRQ,GF_NSRSBH AS FPGF,XF_NSRSBH AS FPXF,JE AS FPJE,SL AS FPSL,SE AS FPSE,FP_MW AS FP_MW,RZ_RGJZ_BZ AS RGJZ,RZ_WXYY AS WXYY,RZ_JG AS RZJGFL,FP_LB,GDZC_BZ  FROM htjs.RZ_FPDKL_MX WHERE RZ_NSRSBH='" + nsrsbh + "' AND to_char(RZ_SJ,'yyyy-mm-dd')<='" + drq + "' and rz_jg=0 " + RzjgSqls;
/* 1399:1196 */             } else if ((drq.equals("no")) && (!brq.equals("no"))) {
/* 1400:1198 */               Sqls = 
/* 1401:1199 */                 "SELECT XF_QYMC,GF_QYMC,QD_BZ,RZ_YF as RZYF,RZ_NSRSBH AS NSRSBH,RZ_SJ AS RZSJ,1 AS TJCS,FPDM,FPHM,FP_KPRQ,GF_NSRSBH AS FPGF,XF_NSRSBH AS FPXF,JE AS FPJE,SL AS FPSL,SE AS FPSE,FP_MW AS FP_MW,RZ_RGJZ_BZ AS RGJZ,RZ_WXYY AS WXYY,RZ_JG AS RZJGFL,FP_LB,GDZC_BZ  FROM htjs.RZ_FPDKL_MX WHERE RZ_NSRSBH='" + nsrsbh + "' AND To_char(RZ_SJ,'yyyy-mm-dd')>='" + brq + "' and rz_jg=0 " + RzjgSqls;
/* 1402:     */             } else {
/* 1403:1204 */               Sqls = 
/* 1404:1205 */                 "SELECT XF_QYMC,GF_QYMC,QD_BZ,RZ_YF as RZYF,RZ_NSRSBH AS NSRSBH,RZ_SJ AS RZSJ,1 AS TJCS,FPDM,FPHM,FP_KPRQ,GF_NSRSBH AS FPGF,XF_NSRSBH AS FPXF,JE AS FPJE,SL AS FPSL,SE AS FPSE,FP_MW AS FP_MW,RZ_RGJZ_BZ AS RGJZ,RZ_WXYY AS WXYY,RZ_JG AS RZJGFL,FP_LB,GDZC_BZ FROM htjs.RZ_FPDKL_MX WHERE RZ_NSRSBH='" + nsrsbh + "' AND To_char(RZ_SJ,'yyyy-mm-dd')>='" + brq + "' AND to_char(RZ_SJ,'yyyy-mm-dd')<='" + drq + "' and rz_jg=0 " + RzjgSqls;
/* 1405:     */             }
/* 1406:     */           }
/* 1407:1209 */           System.out.println("[info] 明细：" + Sqls);
/* 1408:     */           
/* 1409:1211 */           stmt = conn.prepareStatement(Sqls, 1003, 1007);
/* 1410:1212 */           ResultSet rs = stmt.executeQuery();
/* 1411:     */           
/* 1412:1214 */           String rxml = CreateXmlBean.genZzsXMLResult(rs, nsrsbh);
/* 1413:     */           
/* 1414:     */ 
/* 1415:1217 */           String str1 = rxml;
/* 1416:1227 */           if (stmt != null) {
/* 1417:1229 */             stmt.close();
/* 1418:     */           }
/* 1419:1217 */           return str1;
/* 1420:     */         }
/* 1421:     */         catch (SQLException e)
/* 1422:     */         {
/* 1423:     */           String RzjgSqls;
/* 1424:     */           String Sqls;
/* 1425:1221 */           System.out.println("[error] 查询明细数据出现异常 " + e.getMessage());
/* 1426:1227 */           if (stmt != null) {
/* 1427:1229 */             stmt.close();
/* 1428:     */           }
/* 1429:1222 */           return "error mx";
/* 1430:     */         }
/* 1431:     */         finally
/* 1432:     */         {
/* 1433:     */           String RzjgSqls;
/* 1434:     */           String Sqls;
/* 1435:1227 */           if (stmt != null) {
/* 1436:1229 */             stmt.close();
/* 1437:     */           }
/* 1438:     */         }
/* 1439:     */       }
/* 1440:1233 */       return "error";
/* 1441:     */     }
/* 1442:     */     catch (Exception e)
/* 1443:     */     {
/* 1444:1237 */       System.out.println("[error] xml 文件返回出现异常 " + e.getMessage());
/* 1445:1238 */       return "error ";
/* 1446:     */     }
/* 1447:     */     finally
/* 1448:     */     {
/* 1449:1242 */       if (conn != null)
/* 1450:     */       {
/* 1451:1244 */         handler.closeConnection(conn);
/* 1452:1245 */         conn = null;
/* 1453:     */       }
/* 1454:     */     }
/* 1455:     */   }
/* 1456:     */   
/* 1457:     */   public static String doQueryXmlHz(String nsrsbh, String yf, String brq, String drq, String cxfs, String fplx, String gd)
/* 1458:     */     throws ServletException, IOException
/* 1459:     */   {
/* 1460:1261 */     ConnectionPoolBean handler = ConnectionPoolBean.getHandle();
/* 1461:1262 */     Connection conn = null;
/* 1462:1263 */     PreparedStatement stmt = null;
/* 1463:     */     try
/* 1464:     */     {
/* 1465:1266 */       conn = handler.getConnection();
/* 1466:1267 */       if (conn != null)
/* 1467:     */       {
/* 1468:1269 */         String Sqls = "";
/* 1469:1270 */         String je = "0.00";String se = "0.00";int hs = 0;
/* 1470:     */         
/* 1471:     */ 
/* 1472:1273 */         String RzjgSqls = "";
/* 1473:1274 */         if (fplx.equals("A")) {
/* 1474:1276 */           RzjgSqls = " ";
/* 1475:1278 */         } else if (fplx.equals("Z")) {
/* 1476:1280 */           RzjgSqls = " AND FP_LB='YB' ";
/* 1477:1282 */         } else if (fplx.equals("F")) {
/* 1478:1284 */           RzjgSqls = " AND FP_LB='FJ' ";
/* 1479:     */         }
/* 1480:1286 */         if (gd.equals("A")) {
/* 1481:1288 */           RzjgSqls = RzjgSqls + " ";
/* 1482:1290 */         } else if (gd.equals("Y")) {
/* 1483:1292 */           RzjgSqls = RzjgSqls + " AND GDZC_BZ='Y' ";
/* 1484:1294 */         } else if (gd.equals("N")) {
/* 1485:1296 */           RzjgSqls = RzjgSqls + " AND GDZC_BZ='N' ";
/* 1486:     */         }
/* 1487:1299 */         if (cxfs.equals("20")) {
/* 1488:1301 */           Sqls = "select count(*) as fs,sum(je) as je,sum(se) as se  From htjs.rz_fpdkl_mx where rz_nsrsbh='" + nsrsbh + "' AND RZ_YF=" + yf + " and rz_jg='0' " + RzjgSqls;
/* 1489:1305 */         } else if (cxfs.equals("21")) {
/* 1490:1307 */           if ((brq.equals("no")) && (!drq.equals("no"))) {
/* 1491:1310 */             Sqls = "select count(*) as fs,sum(je) as je,sum(se) as se  From htjs.rz_fpdkl_mx WHERE RZ_NSRSBH='" + nsrsbh + "' AND to_char(RZ_SJ,'yyyy-mm-dd')<='" + drq + "' and rz_jg=0 " + RzjgSqls;
/* 1492:1312 */           } else if ((drq.equals("no")) && (!brq.equals("no"))) {
/* 1493:1314 */             Sqls = "select count(*) as fs,sum(je) as je,sum(se) as se  From htjs.rz_fpdkl_mx WHERE RZ_NSRSBH='" + nsrsbh + "' AND To_char(RZ_SJ,'yyyy-mm-dd')>='" + brq + "' and rz_jg=0 " + RzjgSqls;
/* 1494:     */           } else {
/* 1495:1317 */             Sqls = "SELECT count(*) as fs ,sum(JE) AS JE,sum(SE) AS SE FROM htjs.RZ_FPDKL_MX WHERE RZ_NSRSBH='" + nsrsbh + "' AND RZ_SJ>=To_Date('" + brq + "','yyyy-mm-dd') AND RZ_SJ<=To_Date('" + drq + "','yyyy-mm-dd') and rz_jg='0' " + RzjgSqls;
/* 1496:     */           }
/* 1497:     */         }
/* 1498:1321 */         int RecCount = 0;
/* 1499:     */         
/* 1500:1323 */         System.out.println("[info] 汇总 " + Sqls);
/* 1501:     */         try
/* 1502:     */         {
/* 1503:1326 */           stmt = conn.prepareStatement(Sqls, 1003, 1007);
/* 1504:1327 */           ResultSet rsz = stmt.executeQuery();
/* 1505:1328 */           while (rsz.next())
/* 1506:     */           {
/* 1507:1330 */             hs = rsz.getInt("fs");
/* 1508:1331 */             je = rsz.getString("JE");
/* 1509:1332 */             se = rsz.getString("SE");
/* 1510:     */           }
/* 1511:     */           String str1;
/* 1512:1334 */           if (hs == 0)
/* 1513:     */           {
/* 1514:1336 */             rsz.close();
/* 1515:1337 */             System.out.println("[info] 无符合条件的数据记录");
/* 1516:1338 */             return CreateXmlBean.genXMLHeadResult(nsrsbh, 0, "0", "0");
/* 1517:     */           }
/* 1518:     */           ResultSet rsz;
/* 1519:     */           int RecCount;
/* 1520:     */           String RzjgSqls;
/* 1521:     */           int hs;
/* 1522:     */           String se;
/* 1523:     */           String je;
/* 1524:     */           String Sqls;
/* 1525:1342 */           return CreateXmlBean.genXMLHeadResult(nsrsbh, hs, je, se);
/* 1526:     */         }
/* 1527:     */         catch (SQLException e)
/* 1528:     */         {
/* 1529:     */           int RecCount;
/* 1530:     */           String RzjgSqls;
/* 1531:     */           int hs;
/* 1532:     */           String se;
/* 1533:     */           String je;
/* 1534:     */           String Sqls;
/* 1535:1347 */           System.out.println("[error] 查询汇总数据出现异常 " + e.getMessage());
/* 1536:1348 */           return "error sum";
/* 1537:     */         }
/* 1538:     */       }
/* 1539:1351 */       return "error";
/* 1540:     */     }
/* 1541:     */     catch (Exception e)
/* 1542:     */     {
/* 1543:1355 */       System.out.println("[error] xml 文件返回出现异常 " + e.getMessage());
/* 1544:1356 */       return "error ";
/* 1545:     */     }
/* 1546:     */     finally
/* 1547:     */     {
/* 1548:1360 */       if (conn != null)
/* 1549:     */       {
/* 1550:1362 */         handler.closeConnection(conn);
/* 1551:1363 */         conn = null;
/* 1552:     */       }
/* 1553:     */     }
/* 1554:     */   }
/* 1555:     */   
/* 1556:     */   public static String doQueryXmlWpmx(String rz_nsrsbh, String cxfpdm, String cxfphm)
/* 1557:     */   {
/* 1558:1371 */     ConnectionPoolBean handler = ConnectionPoolBean.getHandle();
/* 1559:1372 */     Connection conn = null;
/* 1560:1373 */     PreparedStatement stmt = null;
/* 1561:     */     try
/* 1562:     */     {
/* 1563:1376 */       conn = handler.getConnection();
/* 1564:1377 */       if (conn != null)
/* 1565:     */       {
/* 1566:1379 */         String sql = "select FPDM,FPHM,ID,WP_MC,WP_DW,SL from RZ_FPDKL_MX_QD QD where fpdm='" + cxfpdm + "' and fphm='" + cxfphm + "'";
/* 1567:     */         try
/* 1568:     */         {
/* 1569:1382 */           stmt = conn.prepareStatement(sql, 1003, 1007);
/* 1570:1383 */           ResultSet rs = stmt.executeQuery();
/* 1571:1384 */           String rxml = CreateXmlBean.genWpmxXMLResult(rs, rz_nsrsbh);
/* 1572:1385 */           String str1 = rxml;
/* 1573:1395 */           if (stmt != null) {
/* 1574:1397 */             stmt.close();
/* 1575:     */           }
/* 1576:1385 */           return str1;
/* 1577:     */         }
/* 1578:     */         catch (SQLException e)
/* 1579:     */         {
/* 1580:     */           String sql;
/* 1581:1389 */           System.out.println("[error] 查询物品明细数据出现异常 " + e.getMessage());
/* 1582:1395 */           if (stmt != null) {
/* 1583:1397 */             stmt.close();
/* 1584:     */           }
/* 1585:1390 */           return "error wpmx";
/* 1586:     */         }
/* 1587:     */         finally
/* 1588:     */         {
/* 1589:     */           String sql;
/* 1590:1395 */           if (stmt != null) {
/* 1591:1397 */             stmt.close();
/* 1592:     */           }
/* 1593:     */         }
/* 1594:     */       }
/* 1595:1401 */       return "error";
/* 1596:     */     }
/* 1597:     */     catch (Exception e)
/* 1598:     */     {
/* 1599:1405 */       System.out.println("[error] xml 文件返回出现异常 " + e.getMessage());
/* 1600:1406 */       return "error ";
/* 1601:     */     }
/* 1602:     */     finally
/* 1603:     */     {
/* 1604:1410 */       if (conn != null)
/* 1605:     */       {
/* 1606:1412 */         handler.closeConnection(conn);
/* 1607:1413 */         conn = null;
/* 1608:     */       }
/* 1609:     */     }
/* 1610:     */   }
/* 1611:     */ }


/* Location:           D:\htjs\document\wsrz\WsrzEjbInf\
 * Qualified Name:     gov.sat.tax.fwsk.wlrz.WlrzYcrzcxCmdBean
 * JD-Core Version:    0.7.0.1
 */